#include <stdio.h>

double factorial(int num);

int main() {
	double res=0;int n,i;
	scanf("%d",&n);
	for(i=0;i<=n;i++) res+=1/factorial(i);
	printf("%.12lf",res);
	return 0;
}

double factorial(int num){
	if(num==0) return 1;
	int i;double r=1;
	for(i=0;i<num;i++) r*=(double)(i+1);
	return r;
}